import { ref, computed } from 'vue'
import { defineStore } from 'pinia'
import {getCategoryAPI} from '@/apis/layout.ts'
export const useCategoryStore = defineStore('category', () => {
    const categoryList = ref([])
    const getCategoryList = async ()=>{
        const res = await getCategoryAPI()
        categoryList.value = res.data.result
        console.log(categoryList.value)
    }

    return {
        categoryList,
        getCategoryList
    }
})
